package cn.ekuma.data.ui.android;


import cn.ekuma.data.dao.I_DataLogic;
import cn.ekuma.data.dao.bean.I_ViewBean;
import android.content.Intent;

public abstract class AbstractFinderActivate<T extends I_ViewBean> extends AbstractViewActivate implements OnBaseBeanSelectedListener<T>{


	public static final String SELECTED_BEAN="selected_bean";
	public static final int MSG_SUCCESS = 0;
    public static final int MSG_FAILURE = 1;

    protected I_DataLogic dataLogic;

	public AbstractFinderActivate(I_DataLogic dataLogic) {
		super();
		this.dataLogic = dataLogic;
	}

	public void baseBeanSelected(T obj, int position) {
		Intent result = new Intent();
		result.putExtra(SELECTED_BEAN, obj);
		setResult(RESULT_OK, result);
		finish();
	}
}